package com.sky.feignapi.clients;

import com.sky.feignapi.clients.impl.MerchantClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**调用Merchant模块功能
 * value的值和配置文件的application name一致
 * fallback = MerchantClientImpl.class，用于优雅降级
 * 当服务器宕机的时候，给出友好提示，不至于影响当前功能
 * */
@FeignClient(value = "merchant" ,fallback = MerchantClientImpl.class)
public interface MerchantClient {
    @GetMapping("/merchant/method/{str}")
    public void method(@PathVariable String str);

}
